package com.mas.session.state;

import jade.lang.acl.ACLMessage;

import com.mas.session.Session;
import com.thoughtworks.xstream.XStream;

public class RefuseExitState extends ExitState {

	public RefuseExitState(Session session) {
		super(session);
	}

	public void NoAvailableResource(ACLMessage message)  {
		System.out.println("RefuseExitState.NoAvailableResource()");

		ACLMessage reply = message.createReply();
		XStream xstream = new XStream();
		reply.setContent(xstream.toXML("No Available Resource"));
		reply.setPerformative(ACLMessage.REFUSE);
		this.session.getAgent().send(reply);
		exit(message,"No Available Resource");
	}

}